1. Field of the Invention
The present invention relates to a technique for automatically generating a parameter used for a board inspecting apparatus.
2. Description of the Background Art
Conventionally, board inspecting apparatuses for inspecting a mounted quality on a PC board on which a number of electronic components are mounted have been proposed. According to the PC board, although a “configuration of soldered part between an electrode of an electronic component and a land” is called a solder fillet, there is a case the solder fillet seems to be formed but the electronic component is not in contact with the solder fillet actually depending on a rise at the electrode of the electronic component. Thus, when it is inspected whether soldering is good or not, it is necessary to grasp a configuration of the solder fillet comprising a free curved line correctly.
However, according to the conventional board inspecting apparatus, since a monochrome (single-color) light source is used, it is difficult to analyze an image of a three-dimensional configuration of the solder fillet. Therefore, determination whether the soldering is good or not cannot be made, so that the board inspecting apparatus cannot be put into practical use.
A method for solving the above mentioned problem is presented as a board inspecting apparatus of a system, shown in FIG. 11 (see Japanese Unexamined Patent Publication No. 2-78937). This system is called a three-color light source color highlight system (or simply called a color highlight system), in which a three-dimensional configuration of the solder fillet can be provided as a pseudo-color image by irradiating an inspection target with light sources having a plurality of colors.
As shown in FIG. 11, the board inspecting apparatus of the color highlight system comprises a light emitter 105 that irradiates an inspection target 107 on a board 110 with three primary colors of rays at different angles of incidence, and an imaging device 106 that captures an image formed by reflection light of the color rays from the inspection target 107
When the inspection target (solder fillet) 107 is irradiated with the light emitter 105 having the above constitution, a color light corresponding to the inclination of the surface of the inspection target 107 is inputted to the imaging device 106. Thus, as shown in FIG. 12, color patterns of the captured images are clearly different depending on the configurations of the solder fillets in cases where the soldering of the electronic component is good and where the component is missing and where the solder is insufficient. Thus, since the image of the three-dimensional configuration of the solder fillet can be easily analyzed, determination whether the electronic component is missing or not, or whether the soldering is good or not can be correctly made.
According to the board inspecting apparatus of the color highlight system, a color parameter (color condition) showing a “color to be detected in an acceptable part” or a “color to be detected in a defective part” is previously set and a color region corresponding to the color parameter is extracted from an inspection image and determination is made on the basis of various kinds of features (an area value and a length, for example) in the extracted region. Therefore, it is necessary to previously set the color parameter, the kind of the feature, a determination condition (a threshold value, for example) to separate a good part and a defective part, which are used in an inspecting process, prior to the substantial inspecting process. The color parameter, the feature and the determination condition are called inspection logic or an inspection parameter; in general to set or adjust the inspection logic is called teaching.
In order to improve inspection precision, it is important to set the color parameter so that a significant and a clear difference may be generated between the feature of the good part and the feature of the defective part. That is, the inspection precision is directly affected by a quality of the teaching of the color parameter.
Thus, as shown in FIG. 13, the applicant of the present invention proposes a tool to support the setting of the color parameter in the color highlight system (see Japanese Unexamined Patent Publication No. 9-145633). According to the tool, an upper limit value and a lower limit value of each of the hue ratios ROP, GOP and BOP of red, green and blue, respectively and lightness data BRT can be set as the color parameters. Thus providing means for so the operator can search for the color parameter to obtain an appropriate extracted result while seeing the confirmation region 135 or the binary image.
The board inspecting apparatus has an advantage such that a plurality of inspection items regarding the mounted quality of the PC board can be inspected at one time at high speed with high precision. However, when the board inspecting apparatus is actually operated, it is necessary to perform a teaching operation for each inspection logic according to each inspection target to sufficiently enhance determination precision so as not to miss a defective part and so as to suppress over-detection which determines a good part as a defective part, below an allowable value (previously assumed value).
According to the board inspecting apparatus of the color highlight system, while the board inspecting apparatus can be implemented with high precision for practical use, the teaching operation to prevent the defective part from being missed and to suppress the over-detection below a target value is difficult.
Even when the above color parameter setting support tool is used, since the color parameter is searched relies on the experience and intuition of the operator, a setting miss cannot be avoided. Furthermore, since even a superior operator needs to repeat adjustment through trial and error, this is not efficient and needs a large amount of labor and a long adjustment time.
In frequently changing manufacturing circumstances in which a product life cycle is shortened, it is highly desired that the teaching operation is simplified and furthermore the teaching is automatically performed.
In addition, there is a case where a position of a part to be inspected (solder part or land part or the like) varies according to each component (each captured image) depending on a component kind, and when such component kind is inspected, a process to specify an inspection target region from the image with high precision is needed. For example, in a case of a component having the Gullwing type of lead, a length of the lead (on the image) varies in many cases. Therefore, in order to inspect a solder fillet configuration etc., formed on a land, it is necessary to find a boundary between a lead part first and a solder part and extract only the solder part from the image.
Since an edge part of the lead is horizontal, a red color (of a light source having largest incident angle) tends to appear at the edge part of the lead in the board inspecting apparatus of the color highlight system.
Meanwhile, since the solder part close to the edge of the read is inclined, a blue or green color (of a light source having a small incident angle) tends to appear there. Therefore, when a difference in color distribution tendency is detected, the boundary between the lead and the solder can be determined. That is, by teaching the color of the lead part and the color of the solder part and then matching the colors with their color conditions, the boundary can be specified.
However, the reality is not that simple because a color tendency appearing at the solder part varies depending on the component kind.
For example, the configuration (inclination) of the solder fillet is not uniform and a horizontal surface could be formed in the vicinity of the edge of the lead. Regarding a component having many leads like an IC component especially, since a lead width and an interval of the leads is small, a width of a solder is also small, and it is highly likely that a horizontal surface is formed in the solder fillet. As FIG. 14 shows images of three kinds of components, according to a component kind A, a color of blue kind appears at an entire boundary between the lead and the solder, according to a component kind B, the color of blue kind appears only at the center of a boundary, and according to a component kind C, the color of blue kind appears only at both ends of a boundary.
Such variation in color distribution tendency hinders the teaching from being automatically performed. In addition, the same problem arises in not only the process for specifying the boundary between the lead part and the solder part but also in almost all process for specifying the boundary between adjacent two parts.